package com.quickcancellation.crm.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.quickcancellation.crm.pojo.entity.Dictionary;
import com.quickcancellation.crm.pojo.vo.DicKeyValVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author baomidou
 * @since 2023-02-18
 */
public interface DictionaryMapper extends MPJBaseMapper<Dictionary> {
    /**
     * 获取新的字典key
     * @return
     */
    Integer getNewKey();

    /**
     * 根据dicVal获取dicKey
     * @param dicVal
     * @return
     */
    String getDicKeyByDicVal(String dicVal);

    /**
     * 获取不同模块的字典键值
     * @param model
     * @return
     */
    List<DicKeyValVo> getDicKeyAndValByModel(@Param("model") String model);
}
